package com.tencent.tws.watchfacelib;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Handler;

public abstract class BroadcastReceiverManager
  extends BroadcastReceiver
{
  private final Context context;
  private boolean registered = false;
  
  public BroadcastReceiverManager(Context paramContext)
  {
    this.context = paramContext;
  }
  
  public abstract void onReceive(Context paramContext, Intent paramIntent);
  
  public boolean registerReceiver(IntentFilter paramIntentFilter)
  {
    try
    {
      this.registered = true;
      this.context.registerReceiver(this, paramIntentFilter);
      return true;
    }
    finally
    {
      return false;
//      paramIntentFilter = finally;
//      throw paramIntentFilter;
    }
  }
  
  public boolean registerReceiver(IntentFilter paramIntentFilter, String paramString, Handler paramHandler)
  {
    try
    {
      this.registered = true;
      this.context.registerReceiver(this, paramIntentFilter, paramString, paramHandler);
      return true;
    }
    finally
    {
//      paramIntentFilter = finally;
//      throw paramIntentFilter;
    }
  }
  
  public boolean unregisterReceiver()
  {
    boolean bool = false;
    try
    {
      if (this.registered)
      {
        this.registered = false;
        this.context.unregisterReceiver(this);
        bool = true;
      }
      return bool;
    }
    finally
    {
//      localObject = finally;
//      throw ((Throwable)localObject);
    }
  }
}


/* Location:              G:\zyl\ylwork\Android\Android_Decode\apk2java\apktool2.1.0\WatchFaceSports\classes-dex2jar.jar!\com\tencent\tws\watchfacelib\BroadcastReceiverManager.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */